"use strict";

import Vue from "vue";
import vuex from "vuex";
import login from "./modules/login.js"; //登录
import popper from "./modules/popper.js"; //popper元素
import business from "./modules/business.js"; //业务信息
import setting from "./modules/setting.js"; //设置

Vue.use(vuex);

const debug = process.env.NODE_ENV !== "production"; // 开发环境中为true，否则为false

export default new vuex.Store({
  modules: {
    login,
    popper,
    business,
    setting
  },
  getters: {
    token: state => state.login.token,
    card: state => state.login.card,
    chn: state => state.login.chn,
    photoURL: state => state.login.photoURL,
    user: state => state.login.user,
    popperItems: state => state.popper.items,
    theme: state => state.business.theme,
    menuWidth: state => state.setting.menuWidth,
    name: state => state.setting.name,
    isSetFullScreen: state => state.business.isSetFullScreen,
    documentHeight: state => state.business.documentHeight,
    isShowingHelp: state => state.business.isShowingHelp,
    headerTipContent:state=>state.business.headerTipContent,
    currentClickHeaderTip:state=>state.business.currentClickHeaderTip,
    isOutOfInternet:state=>state.business.isOutOfInternet,
    clickCountInfos:state => state.business.clickCountInfos,
  },
});
